<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>更新员工信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css"
          th:href="@{/css/style.css}"/>
</head>

<body>
<div id="wrap">
    <div id="top_content">
        <div id="header">
            <div id="rightheader">
                <p>
                    2009/11/20
                    <br/>
                </p>
            </div>
            <div id="topheader">
                <h1 id="title">
                    <a href="#">main</a>
                </h1>
            </div>
            <div id="navigation">
            </div>
        </div>
        <div id="content">
            <p id="whereami">
            </p>
            <h1>
                更新员工信息:
            </h1>
            <form th:action="@{/employee/updateDetail}" method="post" enctype="multipart/form-data">
                <table cellpadding="0" cellspacing="0" border="0"
                       class="form_table">
                    <tr>
                        <td valign="middle" align="right">
                            编号:
                        </td>
                        <td valign="middle" align="left">
                            <input type="text" th:value="${employee.id}" readonly name="id"/>
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" align="right">
                            姓名:
                        </td>
                        <td valign="middle" align="left">
                            <input type="text" class="inputgri" name="name" th:value="${employee.name}"/>
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" align="right">
                            当前头像:
                        </td>
                        <td valign="middle" align="left">
                            <img th:src="@{/} + ${employee.photo}" width="60">
                            <input type="hidden" th:value="${employee.photo}">
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" align="right">
                            选择新头像:
                        </td>
                        <td valign="middle" align="left">
                            <input type="file" name="img"/>
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" align="right">
                            工资:
                        </td>
                        <td valign="middle" align="left">
                            <input type="text" class="inputgri" name="salary" th:value="${employee.salary}"/>
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" align="right">
                            生日:
                        </td>
                        <td valign="middle" align="left">
                            <input type="text" class="inputgri" name="birthday"
                                   th:value="${#dates.format(employee.birthday,'yyyy-MM-dd')}"/>
                        </td>
                    </tr>
                </table>
                <p>
                    <input type="submit" class="button" value="更新"/>
                    <input type="button" class="button" value="返回列表" onclick="back()"/>
                    <script>
                        function back() {
                            location.href = '[[@{/employee/findAll}]]'
                        }
                    </script>
                </p>
            </form>
        </div>
    </div>
    <div id="footer">
        <div id="footer_bg">
            ABC@126.com
        </div>
    </div>
</div>
</body>
</html>
